#!/bin/bash

for file in $(ls *.txt); do
  new_name=`basename $file .txt`
  mv $file $new_name 
done

